import java.util.Random;
import java.util.Scanner;

public class DrawLuckyViewers {
    public static void AddViewers(String[] array){
        for(int i = 0; i < array.length; i++){
            System.out.println("请输入你要存储的第"+(i+1)+"个观众");
            Scanner sc = new Scanner(System.in);
            array[i] = sc.nextLine();
        }
    }
    public static int DLViewers(String[] array){
        Random rand = new Random();
        int chosen = rand.nextInt(array.length);
        return chosen;
    }
    public static void main(String[] args) {
        String[] array = new String[3];
        AddViewers(array);
        int ret = DLViewers(array);
        for (int i = 0; i < array.length; i++) {
            System.out.println("第"+(i+1)+"个观众是："+array[i]);
        }
        System.out.println("被抽取到的幸运观众是："+array[ret]);
    }
}
